import request from '@/utils/request'

export function protSku(params) {
  //库存查询
  return request({
    url: '/sku/findAlll',
    method: 'get',
    params
  })
}
export function resetSearch(params) {
  //库存查询
  return request({
    url: '/sku/fuzzy',
    method: 'get',
    params
  })
}
  export function addSku(submitData) {
    return request({
      url: '/sku/goods',
      method: 'post', // 改成 POST
      headers: {
        'Content-Type': 'application/json'
      },
      data: submitData // 使用 data 而不是 params
    });
  }  export function deleteProduct(id) {
    return request({       //根据id 删除用户
      url: '/sku/delete/'+id,
      method: 'delete'
    });
  }
export function modifyGoods(submitData) {
  return request({
    url: '/sku/skugoods',
    method: 'post',
    headers: {
      'Content-Type': 'application/json' // 明确指定请求头
    },
    data: submitData
  });
}
